/*
 Navicat Premium Dump SQL

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 50744 (5.7.44)
 Source Host           : 127.0.0.1:3306
 Source Schema         : smart_community

 Target Server Type    : MySQL
 Target Server Version : 50744 (5.7.44)
 File Encoding         : 65001

 Date: 19/08/2025 10:33:53
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sc_property_company_building_type
-- ----------------------------
DROP TABLE IF EXISTS `sc_property_company_building_type`;
CREATE TABLE `sc_property_company_building_type` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `property_company_id` bigint(20) DEFAULT NULL COMMENT '物业公司ID（可选，NULL表示平台公共建筑类型）',
  `building_type_name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '建筑类型名称',
  `building_type_code` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '建筑类型编码',
  `category_ids` text COLLATE utf8mb4_unicode_ci COMMENT '关联的基础分类ID列表，JSON格式',
  `description` text COLLATE utf8mb4_unicode_ci COMMENT '建筑类型描述',
  `sort_order` int(11) DEFAULT '0' COMMENT '排序',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态：0-禁用，1-启用',
  `create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '是否删除：0-否，1-是',
  `version` int(11) DEFAULT '1' COMMENT '版本号',
  `remark` text COLLATE utf8mb4_unicode_ci COMMENT '备注',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_property_company_code` (`property_company_id`,`building_type_code`),
  KEY `idx_property_company_id` (`property_company_id`),
  KEY `idx_building_type_code` (`building_type_code`),
  KEY `idx_status` (`status`),
  KEY `idx_sort_order` (`sort_order`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='物业公司建筑类型表（property_company_id为NULL时表示平台公共建筑类型）';

-- ----------------------------
-- Records of sc_property_company_building_type
-- ----------------------------
BEGIN;
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (1, 1, '高层塔式普通商品房', 'HIGH_TOWER_COMMERCIAL', '[3,53,66]', '高层塔式普通商品房，适合城市核心区域的高端住宅', 1, 1, 1, '2025-08-13 05:25:29', 1, '2025-08-13 05:25:29', 0, 1, '示例建筑类型1');
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (2, 1, '多层板楼保障性住房', 'MULTI_SLAB_AFFORDABLE', '[5,51,67]', '多层板楼保障性住房，经济适用房类型', 2, 1, 1, '2025-08-13 05:25:29', 1, '2025-08-13 05:25:29', 0, 1, '示例建筑类型2');
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (3, 1, '高层板楼商品房', 'HIGH_SLAB_COMMERCIAL', '[3,53,67]', '高层板楼商品房，南北通透，采光通风好', 3, 1, 1, '2025-08-13 05:25:29', 1, '2025-08-13 05:25:29', 0, 1, '示例建筑类型3');
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (4, 2, '独栋别墅商品房', 'DETACHED_VILLA_COMMERCIAL', '[13,50,56]', '独栋别墅商品房，高端住宅类型', 1, 1, 1, '2025-08-13 05:25:29', 1, '2025-08-13 05:25:29', 0, 1, '示例建筑类型4');
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (5, 2, '联排别墅商品房', 'TOWNHOUSE_COMMERCIAL', '[14,50,56]', '联排别墅商品房，性价比高的别墅类型', 2, 1, 1, '2025-08-13 05:25:29', 1, '2025-08-13 09:48:02', 1, 1, '示例建筑类型5');
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (6, 2, '住宅类砖混结构', '住宅类砖混结构', '[2,43]', '住宅类砖混结构', 0, 1, 9, '2025-08-13 17:46:32', 9, '2025-08-13 17:46:32', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (7, 2, '住宅类保障性住房', '住宅类保障性住房', '[2,4]', '住宅类保障性住房', 0, 1, 9, '2025-08-13 18:05:44', 9, '2025-08-13 18:05:44', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (8, 1012, '老式剪力墙结构低层保障性住房', '老式剪力墙结构低层保障性住房', '[4,70,45,50]', '老式剪力墙结构低层保障性住房', 0, 1, 35, '2025-08-14 10:35:45', 35, '2025-08-14 06:42:45', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (9, 1014, '老式剪力墙结构低层保障性住房', '老式剪力墙结构低层保障性住房', '[4,70,45,50]', '老式剪力墙结构低层保障性住房', 0, 1, 35, '2025-08-14 10:35:45', 35, '2025-08-14 06:41:27', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (10, 1012, '老式剪力墙结构多层商品房', '老式剪力墙结构多层商品房', '[70,45,51,56]', '老式剪力墙结构多层商品房', 0, 1, 35, '2025-08-14 14:45:02', 35, '2025-08-14 06:50:18', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (11, 1014, '老式剪力墙结构多层商品房', '老式剪力墙结构多层商品房', '[70,45,51,56]', '老式剪力墙结构多层商品房', 0, 1, 35, '2025-08-14 14:45:02', 35, '2025-08-14 06:50:21', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (12, 1012, '特色风格框架结构超高层塔楼', '特色风格框架结构超高层塔楼', '[72,44,54,66]', '特色风格框架结构超高层塔楼', 0, 1, 35, '2025-08-14 15:02:01', 35, '2025-08-14 15:02:01', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (13, 1014, '特色风格框架结构超高层塔楼', '特色风格框架结构超高层塔楼', '[72,44,54,66]', '特色风格框架结构超高层塔楼', 0, 1, 35, '2025-08-14 15:02:01', 35, '2025-08-14 15:02:01', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (14, 1014, '老式框架结构超高层塔楼', '老式框架结构超高层塔楼', '[70,44,54,66]', '老式框架结构超高层塔楼', 0, 1, 35, '2025-08-14 23:57:36', 35, '2025-08-14 23:57:36', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (15, 12, '架结构超高层塔楼', '老式框架结构超高层塔楼', '[70,44,54,66]', '老式框架结构超高层塔楼', 0, 1, 35, '2025-08-14 23:57:36', 35, '2025-08-15 06:24:20', 1, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (16, 12, '新式砖混结构多层复式塔楼', '新式砖混结构多层复式塔楼', '[71,43,51,63,66]', '新式砖混结构多层复式塔楼', 0, 1, 35, '2025-08-15 09:54:27', 35, '2025-08-15 14:10:32', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (18, 1014, '新式框架结构多层别墅', '新式框架结构多层别墅', '[12,71,44,51]', '新式框架结构多层别墅', 0, 1, 35, '2025-08-15 14:10:09', 35, '2025-08-15 14:10:09', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (19, 1014, '新式框架结构低层保障性住房', '新式框架结构低层保障性住房', '[4,71,44,50,57]', '新式框架结构低层保障性住房', 0, 1, 35, '2025-08-15 22:30:13', 35, '2025-08-15 22:30:13', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (20, 1012, '新式框架结构低层保障性住房', '新式框架结构低层保障性住房', '[4,71,44,50,57]', '新式框架结构低层保障性住房', 0, 1, 35, '2025-08-15 22:30:14', 35, '2025-08-15 22:30:14', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (21, 1014, '老式砖混结构低层政策性住房', '老式砖混结构低层政策性住房', '[70,43,50,57]', '老式砖混结构低层政策性住房', 0, 1, 35, '2025-08-17 16:30:11', 35, '2025-08-17 16:30:11', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (22, 1012, '老式砖混结构低层政策性住房', '老式砖混结构低层政策性住房', '[70,43,50,57]', '老式砖混结构低层政策性住房', 0, 1, 35, '2025-08-17 16:30:11', 35, '2025-08-17 16:30:11', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (23, 1014, '新式框架结构高层商品房', '新式框架结构高层商品房', '[71,44,53,56]', '新式框架结构高层商品房', 0, 1, 35, '2025-08-18 09:32:14', 35, '2025-08-18 09:32:14', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (24, 1012, '新式框架结构高层商品房', '新式框架结构高层商品房', '[71,44,53,56]', '新式框架结构高层商品房', 0, 1, 35, '2025-08-18 09:32:15', 35, '2025-08-18 09:32:15', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (25, 2, '老式保障性住房', '老式保障性住房', '[4,70]', '老式保障性住房', 0, 1, 9, '2025-08-18 17:08:38', 9, '2025-08-18 17:08:38', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (26, 1010, '老式保障性住房', '老式保障性住房', '[4,70]', '老式保障性住房', 0, 1, 34, '2025-08-18 17:50:48', 34, '2025-08-18 17:50:48', 0, 1, NULL);
INSERT INTO `sc_property_company_building_type` (`id`, `property_company_id`, `building_type_name`, `building_type_code`, `category_ids`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `deleted`, `version`, `remark`) VALUES (27, 1010, '别墅类老式框架结构低层', '别墅类老式框架结构低层', '[12,70,44,50]', '别墅类老式框架结构低层', 0, 1, 34, '2025-08-19 09:55:50', 34, '2025-08-19 09:55:50', 0, 1, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
